package com.ithema.mArrayList;

import java.util.Scanner;

public class Demo {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);

        System.out.println("请输入字符串：");
        String s = sc.nextLine();
        char[] chars = s.toCharArray();
        int bigcount=0;
        int smallcount=0;
        int numcount=0;
        for (int i = 0; i < chars.length; i++) {
            char aChar = chars[i];
            if(aChar>='a'&&aChar<='z'){
                smallcount++;
            }else if(aChar>='A'&&aChar<='Z'){
                bigcount++;
            }else {
                numcount++;

            }        }
        System.out.println("大写字符有："+bigcount+"个");
        System.out.println("小写字符有："+smallcount+"个");
        System.out.println("数字字符有："+numcount+"个");
    }
}
